﻿namespace GoogleApi.Entities.Search.Common.Enums.Extensions
{
    /// <summary>
    /// Country Extension methods.
    /// </summary>
    public static class GeoLocationExtension
    {
        /// <summary>
        /// Return the GeoLocation code.
        /// </summary>
        /// <param name="geoLocation">The <see cref="Country"/>.</param>
        /// <returns>The <see cref="string"/> representation of the <see cref="Country"/> as 'gl' request parameter.</returns>
        public static string ToGl(this GeoLocation geoLocation)
        {
            switch (geoLocation)
            {
                case GeoLocation.Afghanistan: return "af";
                case GeoLocation.Albania: return "al";
                case GeoLocation.Algeria: return "dz";
                case GeoLocation.AmericanSamoa: return "as";
                case GeoLocation.Andorra: return "ad";
                case GeoLocation.Angola: return "ao";
                case GeoLocation.Anguilla: return "ai";
                case GeoLocation.Antarctica: return "aq";
                case GeoLocation.AntiguaAndBarbuda: return "ag";
                case GeoLocation.Argentina: return "ar";
                case GeoLocation.Armenia: return "am";
                case GeoLocation.Aruba: return "aw";
                case GeoLocation.Australia: return "au";
                case GeoLocation.Austria: return "at";
                case GeoLocation.Azerbaijan: return "az";
                case GeoLocation.Bahamas: return "bs";
                case GeoLocation.Bahrain: return "bh";
                case GeoLocation.Bangladesh: return "bd";
                case GeoLocation.Barbados: return "bb";
                case GeoLocation.Belarus: return "by";
                case GeoLocation.Belgium: return "be";
                case GeoLocation.Belize: return "bz";
                case GeoLocation.Benin: return "bj";
                case GeoLocation.Bermuda: return "bm";
                case GeoLocation.Bhutan: return "bt";
                case GeoLocation.Bolivia: return "bo";
                case GeoLocation.BosniaAndHerzegovina: return "ba";
                case GeoLocation.Botswana: return "bw";
                case GeoLocation.BouvetIsland: return "bv";
                case GeoLocation.Brazil: return "br";
                case GeoLocation.BritishIndianOceanTerritory: return "io";
                case GeoLocation.BruneiDarussalam: return "bn";
                case GeoLocation.Bulgaria: return "bg";
                case GeoLocation.BurkinaFaso: return "bf";
                case GeoLocation.Burundi: return "bi";
                case GeoLocation.Cambodia: return "kh";
                case GeoLocation.Cameroon: return "cm";
                case GeoLocation.Canada: return "ca";
                case GeoLocation.CapeVerde: return "cv";
                case GeoLocation.CaymanIslands: return "ky";
                case GeoLocation.CentralAfricanRepublic: return "cf";
                case GeoLocation.Chad: return "td";
                case GeoLocation.Chile: return "cl";
                case GeoLocation.China: return "cn";
                case GeoLocation.ChristmasIsland: return "cx";
                case GeoLocation.CocosIslands: return "cc";
                case GeoLocation.Colombia: return "co";
                case GeoLocation.Comoros: return "km";
                case GeoLocation.Congo: return "cg";
                case GeoLocation.TheDemocraticRepublicOfCongo: return "cd";
                case GeoLocation.CookIslands: return "ck";
                case GeoLocation.CostaRica: return "cr";
                case GeoLocation.CoteDivoire: return "ci";
                case GeoLocation.Croatia: return "hr";
                case GeoLocation.Cuba: return "cu";
                case GeoLocation.Cyprus: return "cy";
                case GeoLocation.CzechRepublic: return "cz";
                case GeoLocation.Denmark: return "dk";
                case GeoLocation.Djibouti: return "dj";
                case GeoLocation.Dominica: return "dm";
                case GeoLocation.DominicanRepublic: return "do";
                case GeoLocation.EastTimor: return "tp";
                case GeoLocation.Ecuador: return "ec";
                case GeoLocation.Egypt: return "eg";
                case GeoLocation.ElSalvador: return "sv";
                case GeoLocation.EquatorialGuinea: return "gq";
                case GeoLocation.Eritrea: return "er";
                case GeoLocation.Estonia: return "ee";
                case GeoLocation.Ethiopia: return "et";
                case GeoLocation.EuropeanUnion: return "en";
                case GeoLocation.FalklandIslAndsMalvinas: return "fk";
                case GeoLocation.FaroeIslands: return "fo";
                case GeoLocation.Fiji: return "fj";
                case GeoLocation.Finland: return "fi";
                case GeoLocation.France: return "fr";
                case GeoLocation.FranceMetropolitan: return "fr";
                case GeoLocation.FrenchGuiana: return "gf";
                case GeoLocation.FrenchPolynesia: return "pf";
                case GeoLocation.FrenchSouthernTerritories: return "tf";
                case GeoLocation.Gabon: return "ga";
                case GeoLocation.Gambia: return "gm";
                case GeoLocation.Georgia: return "ge";
                case GeoLocation.Germany: return "de";
                case GeoLocation.Ghana: return "gh";
                case GeoLocation.Gibraltar: return "gi";
                case GeoLocation.Greece: return "gr";
                case GeoLocation.Greenland: return "gl";
                case GeoLocation.Grenada: return "gd";
                case GeoLocation.Guadeloupe: return "gp";
                case GeoLocation.Guam: return "gu";
                case GeoLocation.Guatemala: return "gt";
                case GeoLocation.Guinea: return "gn";
                case GeoLocation.GuineaBissau: return "gw";
                case GeoLocation.Guyana: return "gy";
                case GeoLocation.Haiti: return "ht";
                case GeoLocation.HeardIslandAndMcdonaldIslands: return "hm";
                case GeoLocation.VaticanCityState: return "va";
                case GeoLocation.Honduras: return "hn";
                case GeoLocation.HongKong: return "hk";
                case GeoLocation.Hungary: return "hu";
                case GeoLocation.Iceland: return "is";
                case GeoLocation.India: return "in";
                case GeoLocation.Indonesia: return "id";
                case GeoLocation.Iran: return "ir";
                case GeoLocation.Iraq: return "iq";
                case GeoLocation.Ireland: return "ie";
                case GeoLocation.Israel: return "il";
                case GeoLocation.Italy: return "it";
                case GeoLocation.Jamaica: return "jm";
                case GeoLocation.Japan: return "jp";
                case GeoLocation.Jordan: return "jo";
                case GeoLocation.Kazakhstan: return "kz";
                case GeoLocation.Kenya: return "ke";
                case GeoLocation.Kiribati: return "ki";
                case GeoLocation.DemocraticPeoplesRepublicOfKorea: return "kp";
                case GeoLocation.RepublicOfKorea: return "kr";
                case GeoLocation.Kuwait: return "kw";
                case GeoLocation.Kyrgyzstan: return "kg";
                case GeoLocation.LaoPeoplesDemocraticRepublic: return "la";
                case GeoLocation.Latvia: return "lv";
                case GeoLocation.Lebanon: return "lb";
                case GeoLocation.Lesotho: return "ls";
                case GeoLocation.Liberia: return "lr";
                case GeoLocation.LibyanArabJamahiriya: return "ly";
                case GeoLocation.Liechtenstein: return "li";
                case GeoLocation.Lithuania: return "lt";
                case GeoLocation.Luxembourg: return "lu";
                case GeoLocation.Macao: return "mo";
                case GeoLocation.Macedonia: return "mk";
                case GeoLocation.Madagascar: return "mg";
                case GeoLocation.Malawi: return "mw";
                case GeoLocation.Malaysia: return "my";
                case GeoLocation.Maldives: return "mv";
                case GeoLocation.Mali: return "ml";
                case GeoLocation.Malta: return "mt";
                case GeoLocation.MarshallIslands: return "mh";
                case GeoLocation.Martinique: return "mq";
                case GeoLocation.Mauritania: return "mr";
                case GeoLocation.Mauritius: return "mu";
                case GeoLocation.Mayotte: return "yt";
                case GeoLocation.Mexico: return "mx";
                case GeoLocation.Micronesia: return "fm";
                case GeoLocation.Moldova: return "md";
                case GeoLocation.Monaco: return "mc";
                case GeoLocation.Mongolia: return "mn";
                case GeoLocation.Montserrat: return "ms";
                case GeoLocation.Morocco: return "ma";
                case GeoLocation.Mozambique: return "mz";
                case GeoLocation.Myanmar: return "mm";
                case GeoLocation.Namibia: return "na";
                case GeoLocation.Nauru: return "nr";
                case GeoLocation.Nepal: return "np";
                case GeoLocation.Netherlands: return "nl";
                case GeoLocation.NetherlandsAntilles: return "an";
                case GeoLocation.NewCaledonia: return "nc";
                case GeoLocation.NewZealand: return "nz";
                case GeoLocation.Nicaragua: return "ni";
                case GeoLocation.Niger: return "ne";
                case GeoLocation.Nigeria: return "ng";
                case GeoLocation.Niue: return "nu";
                case GeoLocation.NorfolkIsland: return "nf";
                case GeoLocation.NorthernMarianaIslands: return "mp";
                case GeoLocation.Norway: return "no";
                case GeoLocation.Oman: return "om";
                case GeoLocation.Pakistan: return "pk";
                case GeoLocation.Palau: return "pw";
                case GeoLocation.PalestinianTerritory: return "ps";
                case GeoLocation.Panama: return "pa";
                case GeoLocation.PapuaNewGuinea: return "pg";
                case GeoLocation.Paraguay: return "py";
                case GeoLocation.Peru: return "pe";
                case GeoLocation.Philippines: return "ph";
                case GeoLocation.Pitcairn: return "pn";
                case GeoLocation.Poland: return "pl";
                case GeoLocation.Portugal: return "pt";
                case GeoLocation.PuertoRico: return "pr";
                case GeoLocation.Qatar: return "qa";
                case GeoLocation.Reunion: return "re";
                case GeoLocation.Romania: return "ro";
                case GeoLocation.RussianFederation: return "ru";
                case GeoLocation.Rwanda: return "rw";
                case GeoLocation.SaintHelena: return "sh";
                case GeoLocation.SaintKittsAndNevis: return "kn";
                case GeoLocation.SaintLucia: return "lc";
                case GeoLocation.SaintPierreAndMiquelon: return "pm";
                case GeoLocation.SaintVincentAndtheGrenadines: return "vc";
                case GeoLocation.Samoa: return "ws";
                case GeoLocation.SanMarino: return "sm";
                case GeoLocation.SaoTomeAndPrincipe: return "st";
                case GeoLocation.SaudiArabia: return "sa";
                case GeoLocation.Senegal: return "sn";
                case GeoLocation.SerbiaAndMontenegro: return "cs";
                case GeoLocation.Seychelles: return "sc";
                case GeoLocation.SierraLeone: return "sl";
                case GeoLocation.Singapore: return "sg";
                case GeoLocation.Slovakia: return "sk";
                case GeoLocation.Slovenia: return "si";
                case GeoLocation.SolomonIslands: return "sb";
                case GeoLocation.Somalia: return "so";
                case GeoLocation.SouthAfrica: return "za";
                case GeoLocation.SouthGeorgiaAndTheSouthSAndwichIslands: return "gs";
                case GeoLocation.Spain: return "es";
                case GeoLocation.SriLanka: return "lk";
                case GeoLocation.Sudan: return "sd";
                case GeoLocation.Suriname: return "sr";
                case GeoLocation.SvalbardAndJanMayen: return "sj";
                case GeoLocation.Swaziland: return "sz";
                case GeoLocation.Sweden: return "se";
                case GeoLocation.Switzerland: return "ch";
                case GeoLocation.SyrianArabRepublic: return "sy";
                case GeoLocation.Taiwan: return "tw";
                case GeoLocation.Tajikistan: return "tj";
                case GeoLocation.Tanzania: return "tz";
                case GeoLocation.Thailand: return "th";
                case GeoLocation.Togo: return "tg";
                case GeoLocation.Tokelau: return "tk";
                case GeoLocation.Tonga: return "to";
                case GeoLocation.TrinidadAndTobago: return "tt";
                case GeoLocation.Tunisia: return "tn";
                case GeoLocation.Turkey: return "tr";
                case GeoLocation.Turkmenistan: return "tm";
                case GeoLocation.TurksAndCaicosIslands: return "tc";
                case GeoLocation.Tuvalu: return "tv";
                case GeoLocation.Uganda: return "ug";
                case GeoLocation.Ukraine: return "ua";
                case GeoLocation.UnitedArabEmirates: return "ae";
                case GeoLocation.UnitedKingdom: return "uk";
                case GeoLocation.UnitedStates: return "us";
                case GeoLocation.UnitedStatesMinorOutlyingIslands: return "um";
                case GeoLocation.Uruguay: return "uy";
                case GeoLocation.Uzbekistan: return "uz";
                case GeoLocation.Vanuatu: return "vu";
                case GeoLocation.Venezuela: return "ve";
                case GeoLocation.Vietnam: return "vn";
                case GeoLocation.VirginIslandsBritish: return "vg";
                case GeoLocation.VirginIslandsUs: return "vi";
                case GeoLocation.WallisandFutuna: return "wf";
                case GeoLocation.WesternSahara: return "eh";
                case GeoLocation.Yemen: return "ye";
                case GeoLocation.Yugoslavia: return "yo";
                case GeoLocation.Zambia: return "zm";
                case GeoLocation.Zimbabwe: return "zw";

                default:
                    return string.Empty;
            }
        }
    }
}